<script type="text/javascript">
function change_user_status() {
    $.get('<?php echo $html->admin_url('/users/ajax_change_user_status/' . $user_id); ?>', function (data) {
        $('#user_status').html(data);
    });
}
</script>
<div id="sub-menu-box"> <?php echo $html->admin_link('&laquo; ' . __('Return Users'), '/users'); ?></div>

<div id="content">
  <h2><?php echo $title; ?></h2>
<p></p>

<form action="" id="settings" method="post">
    <table>
      <tbody>
        <tr>
          <th><?php __e('Username'); ?></th>
          <td>
<?php
    if (empty($username)) {
        echo $html->input('Users/username');
    } else {
        echo $username;
        if ($user_id != 1) {
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" id="user_status" onclick="change_user_status();return false;"><?php echo $status; ?></a>
<?php
        }
    }
?>
            </td>
        </tr>
        <tr>
          <th><?php __e('Group'); ?></th>
          <td>
<?php
if ($user_id != 1) {
    echo $html->select('Users/group_id', $groups);
} else {
    echo $username . __(' is not in any group in this site , but he has all power, you can\'t delete it.<br> It\'s a better way that don\'t use this account post.');
}
?>
            </td>
        </tr>
        <tr>
          <th><?php __e('Password'); ?></th>
          <td>
<?php
if (empty($username)) {
?>
      <span class="inlinefield">
        <label for="p1"><?php __e('Password'); ?></label>
        <br>
        <?php echo $html->input('Users/password_alpha', array('type'=>'password', 'size'=>12)); ?>
      </span>
      <span class="inlinefield">
        <label for="p2"><?php __e('Re-enter password'); ?></label>
        <br>
        <?php echo $html->input('Users/password_beta', array('type'=>'password', 'size'=>12)); ?>
      </span>
<?php
} else {
?>
<div id="passView" >
<a href="#" onclick="showItem('passEdit'); hideItem('passView'); return false;"><?php echo __('Change password'); ?></a>
</div>
<div style="display: none;" id="passEdit" class="hidden">
<input name="data[Users][password_alpha]" type="password" size="10" id="password_alpha" />&nbsp;&nbsp; 
<?php __e('Re-enter Password'); ?><input name="data[Users][password_beta]" type="password" size="10" id="password_beta"  /> &nbsp;&nbsp; <a href="#" onclick="hideItem('passEdit'); showItem('passView'); clear_input_value('password_alpha'); clear_input_value('password_beta'); return false;"><?php __e('Cancel'); ?></a></div>
<?php
}
?>
          </td>
        </tr>
        <tr>
          <th><?php __e('Nicknames'); ?></th>
          <td>
            <?php echo $html->input('Users/nickname'); ?>
          </td>
        </tr>
        <tr>
          <th><?php __e('E-mail'); ?></th>
          <td><?php echo $html->input('Users/email'); ?></td>
        </tr>
        <tr>
          <th><?php __e('Website'); ?></th>
          <td><?php echo $html->input('Users/url'); ?></td>
        </tr>
        <tr>
          <th><?php __e('Tell'); ?></th>
          <td><?php echo $html->input('Users/tell'); ?></td>
        </tr>

        <tr>
          <th><?php __e('AIM'); ?></th>
          <td><?php echo $html->input('Users/aim'); ?></td>
        </tr>
        <tr>
          <th><?php __e('Yahoo IM'); ?></th>
          <td><?php echo $html->input('Users/yim'); ?></td>
        </tr>

        <tr>
          <th><?php __e('Jabber / Google Talk'); ?></th>
          <td><?php echo $html->input('Users/jabber'); ?></td>
        </tr>
        <tr class="finalrow">
          <th></th>
          <td><input value="<?php echo $submit_value; ?>" type="submit">
<input value="<?php __e('Cancel'); ?>" class="cancel" onclick="window.location = '<?php echo $html->admin_url('/users'); ?>';" type="button">
          </td>
        </tr>
      </tbody>
    </table>
  </form>
</div>
